<#macro relation_table att>
    <#assign relation_table_name = "">
    <#list [att.@class,object.@name]?sort as l>
        <#assign relation_table_name = relation_table_name + l>
        <#if l_has_next>
            <#assign relation_table_name = relation_table_name + "_" >
        </#if>
    </#list>
</#macro>
<#macro relation att>
    <#if att.@name[0]??>
        <#assign relation_name = att.@name>
    <#else>
        <#assign relation_name = att.@class?uncap_first + "Id">
    </#if>
</#macro>

